﻿package net.wangit.dev.wizard.unit;

import net.wangit.jdbc.ColumnRow;
import net.wangit.jdbc.DB;
import net.wangit.jdbc.Table;

public class APage {

	public APage() {
	}

	public static final void create(DB db, String groupId, String unitId,
			String unitName) throws Exception {
		Table table = new Table("dev", "UNIT");
		ColumnRow cRow = table.addInsertRow();
		cRow.set("uid", unitId);
		cRow.set("gid", groupId);
		cRow.set("c", 1);
		cRow.set("co", 1);
		cRow.set("ti", unitName);
		cRow.set("st", 0);
		cRow.set("ub", 0);
		cRow.set("tb", 0);
		cRow.set("gb", 0);
		cRow.set("cb", 0);
		cRow.set("ms", "1");
		cRow.set("me", "0");
		cRow.set("ma", "0");
		cRow.set("l", "0");
		cRow.set("y", "0");
		cRow.set("pp", 1);
		cRow.set("au", 1);
		db.save(table);
	}
}
